function[] = QC_alpha3(data,T,s,t,stderr)
%%%% Computes CDF-based (quick&crude) estimate of alpha3 in [T-d2,T] based on s,t
%%%% within this interval, and gives a standard error based on
%%%% bootstrap.
%%%% data = vector of all bid times
%%%% T = length of auctions (in seven day auctions, enter 7)
%%%% s, t = two values that are most likely within the last (ristretto) interval [T-d2, T].
%%%% stderr = flag for whether bootstrap stanadard deviation is computed.
%%%% Default is yes. Chose value other than 1 to supress this.
if nargin < 5,
    stderr = 1;
end

alpha3 = QC_a3(data,T,s,t)

if stderr == 1,
    M=500; %%% Sets number of bootstrap samples
    bt_data = bootrsp(data,M);

    for j=1:M, 
        if QC_a3(bt_data(:,j)',T,s,t) < Inf,
            alpha(j) = QC_a3(bt_data(:,j)',T,s,t); 
        end
    end
    std_alpha3 = std(alpha)/sqrt(M)
end

function[alpha3] = QC_a3(data,T,s,t)
alpha3 = log( (1-Empirical_CDF(data,s))/(1-Empirical_CDF(data,t)) ) / log( (T-s)/(T-t));